import java.util.Scanner;

/**
 * @Author YuanYuan
 * @Date 2022/4/23
 * @Time 19:40
 */
public class TestDemo {
    public static int fun(int x) {
        int sum = 0;
        while(x!=0) {
            if((x&1) == 1) {
                sum++;
            }
            x>>=1;
        }
        return sum;
    }
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int x = scanner.nextInt();
        int sum = fun(x);
        System.out.println(sum);
    }
}
